package com.haima.sage.bigdata.api.vo.param.where;


import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonSubTypes.Type;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeInfo.As;
import com.fasterxml.jackson.annotation.JsonTypeInfo.Id;
import com.haima.sage.bigdata.api.frame.condition.impl.ConditionService;

@JsonTypeInfo(use = Id.NAME,
        include = As.EXISTING_PROPERTY,
        property = "operator",
        defaultImpl = WhereConditionItem.class,
        visible = true)
@JsonSubTypes({
        @Type(value = WhereConditionGroup.class, name = "and"),
        @Type(value = WhereConditionGroup.class, name = "or"),
        @Type(value = WhereConditionGroup.class, name = "not")})
public abstract class WhereCondition {
    private WhereOperatorType operator;

    public WhereOperatorType getOperator() {
        return operator;
    }

    public void setOperator(WhereOperatorType operator) {
        this.operator = operator;
    }
}
